// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import axios from 'axios'
import vueJsonp from 'vue-jsonp'
import App from './App'
import router from './router'
import MainPage from './pages/MainPage'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

window.onerror=()=>{return true};
Vue.prototype.$axios= axios;

Vue.use(vueJsonp);
Vue.use(ElementUI);
Vue.prototype.initImg=require('../src/assets/init_img.png');
Vue.filter(
	'initDate',
	item=>{
		let t = new Date(item);
		let day = [0,1,2,3,4,5,6],bigDay=['日','一','二','三','四','五','六'];
		let newDate =` ${t.getFullYear()}年/${t.getMonth()}月/${t.getDate()}日 
					   ${String(t.getHours()).length==1?0:'' }${t.getHours()} : ${String(t.getMinutes()).length==1?0:'' }${t.getMinutes()}    
					   (周${bigDay[day.indexOf(t.getDay())]})
					 `;
		return newDate
	}
);
Vue.filter(
	'initTime',
	item=>{
		let m=parseInt(item/60000),
			s =parseInt (item%60000/1000),
			init=`${m}′ ${s}″`;
		return init
	}
);

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App,MainPage},
	template: '<MainPage/>',
	data:{
				
		
	},
	methods:{
		navGo(str){sessionStorage.navActive=str;}
		
	}
	
})
